package cn.cai.pethome.pet.domain;


import cn.cai.pethome.base.domain.BaseDomain;
import cn.cai.pethome.shop.domain.Shop;
import cn.cai.pethome.user.domain.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author xiaocai
 * @since 2022-09-10
 */
@Data
public class Pet extends BaseDomain {

    private static final long serialVersionUID = 1L;

    private String name;
    private BigDecimal saleprice;
    private String costprice;
    /**
     * 状态：0下架 1上架  2上架审核中
     */
    private Integer state = 0;
    /**
     * 类型id
     */
    private Long type_id;
    private PetType petType; //PetType对象

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date offsaletime;  //下架时间
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date onsaletime;//上架时间
    private Date createtime = new Date();
    /**
     * 店铺Id 如果被领养店铺id为null
     */
    private Long shop_id;
    private Shop shop;
    /**
     * 如果被领养为领养用户id
     */
    private Long user_id;
    private User buyer;//买家

    private Long search_master_msg_id;
    /**
     * 封面图
     */
    private String pic;

    private List<String> petImages = new ArrayList<>();


    //宠物图片
    private List<String> imgUrls = new ArrayList<>();
    //宠物详情描述
    private String adoptNotice;
    private String intro;

}
